<template>
    <div id="appa">
      <!--<p>父组件传给子组件的toCity:{{sendData}}</p>-->
      <!--<button class="btn" @click="select('大连')">Click me</button>-->

      <!--<input-->
        <!--v-bind="$attrs"-->
        <!--v-bind:value="value"-->
      <!--&gt;-->
      <div class="staff_list list">
        <div v-for="(item,index) in stafflist">
          <p class="img"></p>
          <p class="name common">{{item.staffName}}</p>
          <p class="score common" v-if="item.score != undefined">{{item.score}}</p>
          <p class="score common" v-else>0</p>
        </div>
        <div style="clear: both;"></div>
      </div>
      <div class="staff_ranking_list list">
        <div v-for="(item,index) in deplist">
          <p class="img"></p>
          <p class="depname">{{item.depName}}</p>
        </div>
        <div style="clear: both;"></div>
      </div>
    </div>
</template>

<script>
    export default {

        name: "base-btn",
        inheritAttrs: false,
        props: ['label', 'value', 'sendData', 'stafflist', 'deplist'],
        data: function () {
          return {

          }
        },
      methods:{
        select: function(val){
          let data = {
            cityName: val
          };
          this.$emit('show-city-name', data)

        }
      },
      created: function () {
        console.log(this.$attrs)
      }
    }
</script>

<style scoped>
  .list{clear: both;}
.list div{float: left;width:33%;}
.list .img{
  width: 50px;
  height: 50px;
  background: #ccc;
  margin: 0 auto;
}
  .depname,.common{font-size:12px;text-align: center;}
</style>
